<script setup>
const props = defineProps({
  btnText: {
    type: String,
    default: '查看',
  },
  type: {
    type: [String, Number],
    default: 1
  }
})
const emit = defineEmits(['click'])
</script>

<template>
  <div
    class="w-full h-full flex justify-center items-center rounded-[4px] whitespace-nowrap cursor-pointer hover:(bg-[var(--pro-admin-layout-content-bg)]) "
    :class="type == 1 ? 'btn' : 'btn1'" @click="emit('click')">
    {{ btnText }}
  </div>
</template>

<style  scoped>
.btn {
  border: 1px solid var(--pro-admin-layout-content-bg);
  color: var(--pro-admin-layout-content-bg);
}

.btn1 {
  color: var(--text-color-title);
  background-color: #f1f5f9;
}

.btn:hover {
  color: #fff;

}

.btn1:hover {
  color: #fff;
  background-color: var(--pro-admin-layout-content-bg);
}
</style>
